#include <func.h>

int main(int argc, char *argv[])
{
    ARGS_CHECK(argc, 2);
    struct stat s;
    char pathname[500];
    char filename[30];
    //sprintf(pathname, "%s/%s", argv[1], filename);
    // printf("%s\n",pathname);
    int ret = stat(argv[1], &s);
    ERROR_CHECK(ret, -1, "stat");
    struct tm *modtim = localtime(&(s.st_mtime));
    printf("%s %6ld %d-%d-%d %02d:%02d:%02d %s\n",
           getpwuid(s.st_uid)->pw_name,
           s.st_size,
           modtim->tm_year+1900,
           modtim->tm_mon+1,
           modtim->tm_mday,
           modtim->tm_hour,
           modtim->tm_min,
           modtim->tm_sec,
           argv[1]);
}
